{
 "cells": [
  {
   "cell_type": "markdown",
   "id": "8a268e31",
   "metadata": {},
   "source": [
    "# 使用空间数据\n",
    "空间数据是指在一个几何空间中表示的数据。\n",
    "\n",
    "例如，坐标系上的点。\n",
    "\n",
    "我们在许多任务中处理空间数据问题。\n",
    "\n",
    "例如，寻找一个点是否在一个边界内。\n",
    "\n",
    "SciPy为我们提供了scipy.spatial模块，它具有处理空间数据的功能。\n",
    "\n",
    "# 三角测量\n",
    "多边形的三角测量是将多边形划分为多个三角形，我们可以通过这些三角形计算出多边形的面积。\n",
    "\n",
    "带点三角剖分是指创建由三角形组成的曲面，其中所有给定的点都在该曲面中任何一个三角形的至少一个顶点上。\n",
    "\n",
    "一种通过点来生成这些三角形的方法是Delaunay() Triangulation。"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "id": "025a0d10",
   "metadata": {},
   "outputs": [],
   "source": [
    "import numpy as np\n",
    "import matplotlib.pyplot as plt"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "id": "85da9664",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXQAAAD4CAYAAAD8Zh1EAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjQuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8rg+JYAAAACXBIWXMAAAsTAAALEwEAmpwYAABA8klEQVR4nO3dd3hUZdrH8e+T3gMhlRIChJ5QQ1NELEgRQQUVxIIC0VVXV98VCxYsKOiui3WVZkGKLkWxAIIgiNJbEkJJKKGlEgjpZeZ5/5hJGGKAAEmm5P5cVy5mzpyZuT1OfnnmnKcorTVCCCHsn5O1CxBCCFEzJNCFEMJBSKALIYSDkEAXQggHIYEuhBAOwsVabxwYGKgjIiKs9fZCCGGXtm/fnqW1DqrqMasFekREBNu2bbPW2wshhF1SSqVc6DE55SKEEA5CAl0IIRyEBLoQQjgICXQhhHAQEuhCCOEgqh3oSilnpdRO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OBh+q4rlnAaYvHt5m3tzT/j9oN7AEm1XFdT5jfdzemi2nXWDx/CKYeKAfrui7zfmMxXQiyfG5tHq9OwE5zXQnAK+btr2Nq9QJ4AP8zf4a2AC0tnj/JfKz2A4PruK7VQLrF8Vxm3n6N+fdgt/nfcXVc19sWn6+1QDuL59fW7+Ml6zLfnwxMrfTcWjteld6nP+ZAr8vPlwz9F0IIB2Fz59CFEEJcGQl0IYRwEBLoQgjhICTQhRDCQUigCyGEg5BAF0IIByGBLoQQDuL/AdiyETcq72FmAAAAAElFTkSuQmCC\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "from scipy.spatial import Delaunay\n",
    "\n",
    "points = np.array([\n",
    "  [2, 4],\n",
    "  [3, 4],\n",
    "  [3, 0],\n",
    "  [2, 2],\n",
    "  [4, 1]\n",
    "])\n",
    "\n",
    "simplices = Delaunay(points).simplices\n",
    "\n",
    "plt.triplot(points[:, 0], points[:, 1], simplices)\n",
    "plt.scatter(points[:, 0], points[:, 1], color='r')\n",
    "\n",
    "plt.show()"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "ee32ab41",
   "metadata": {},
   "source": [
    "# 凸面体\n",
    "凸面体是覆盖所有给定点的最小的多边形。\n",
    "\n",
    "使用ConvexHull()方法来创建一个凸面体。"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "id": "a2c87c57",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXQAAAD4CAYAAAD8Zh1EAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjQuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8rg+JYAAAACXBIWXMAAAsTAAALEwEAmpwYAAAz+ElEQVR4nO3dd3gUZdfH8e8JBAhdmlIF6YgIEkIVEJAmEhBRUBAVHghNLHQIJVFa6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dKKTehBV0ppdyEFnSllHITWtCVUspNaEFXSik3oQVdKaXcxP8Bg1novoL6lyoAAAAASUVORK5CYII=\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "from scipy.spatial import ConvexHull\n",
    "\n",
    "points = np.array([\n",
    "  [2, 4],\n",
    "  [3, 4],\n",
    "  [3, 0],\n",
    "  [2, 2],\n",
    "  [4, 1],\n",
    "  [1, 2],\n",
    "  [5, 0],\n",
    "  [3, 1],\n",
    "  [1, 2],\n",
    "  [0, 2]\n",
    "])\n",
    "\n",
    "hull = ConvexHull(points)\n",
    "hull_points = hull.simplices\n",
    "\n",
    "plt.scatter(points[:,0], points[:,1])\n",
    "for simplex in hull_points:\n",
    "  plt.plot(points[simplex,0], points[simplex,1], 'k-')\n",
    "\n",
    "plt.show()"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "cf8f5b63",
   "metadata": {},
   "source": [
    "# KDTrees\n",
    "KDTrees是一种为最近的邻居查询而优化的数据结构。\n",
    "\n",
    "例如，在一个点的集合中，使用KDTree我们可以有效地询问哪些点离某个给定的点最近。\n",
    "\n",
    "KDTree()方法返回一个KDTree对象。\n",
    "\n",
    "query()方法返回与最近的邻居的距离和邻居的位置。"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "id": "fb6a2f78",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "(2.0, 0)\n"
     ]
    }
   ],
   "source": [
    "from scipy.spatial import KDTree\n",
    "\n",
    "points = [(1, -1), (2, 3), (-2, 3), (2, -3)]\n",
    "\n",
    "kdtree = KDTree(points)\n",
    "\n",
    "res = kdtree.query((1, 1))\n",
    "\n",
    "print(res)"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "4effbbc3",
   "metadata": {},
   "source": [
    "# 距离矩阵\n",
    "在数据科学中，有许多距离度量用于寻找两点之间的各种类型的距离，欧氏距离、余弦距离等。\n",
    "\n",
    "两个向量之间的距离可能不仅仅是它们之间的直线长度，它也可以是它们与原点之间的角度，或者需要的单位步数等。\n",
    "\n",
    "许多机器学习算法的性能在很大程度上取决于距离矩阵。例如，\"K最近的邻居 \"或 \"K平均值 \"等。\n",
    "\n",
    "让我们来看看一些距离矩阵。\n",
    "\n",
    "# 欧氏距离 Euclidean Distance\n",
    "找到给定点之间的欧氏距离。"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "id": "89fbc45c",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "9.219544457292887\n"
     ]
    }
   ],
   "source": [
    "from scipy.spatial.distance import euclidean\n",
    "\n",
    "p1 = (1, 0)\n",
    "p2 = (10, 2)\n",
    "\n",
    "res = euclidean(p1, p2)\n",
    "\n",
    "print(res)"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "7cd22997",
   "metadata": {},
   "source": [
    "# 城市街区距离（曼哈顿距离）\n",
    "在4个方向上计算的距离。\n",
    "\n",
    "例如，我们只能移动：向上、向下、向右或向左，而不是斜向移动。"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "id": "84f83f2c",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "11\n"
     ]
    }
   ],
   "source": [
    "from scipy.spatial.distance import cityblock\n",
    "\n",
    "p1 = (1, 0)\n",
    "p2 = (10, 2)\n",
    "\n",
    "res = cityblock(p1, p2)\n",
    "\n",
    "print(res)"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "3ad9dfd4",
   "metadata": {},
   "source": [
    "# 余弦距离\n",
    "是指两点A和B之间的余弦角的值。"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "id": "da98c370",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "0.019419324309079777\n"
     ]
    }
   ],
   "source": [
    "from scipy.spatial.distance import cosine\n",
    "\n",
    "p1 = (1, 0)\n",
    "p2 = (10, 2)\n",
    "\n",
    "res = cosine(p1, p2)\n",
    "\n",
    "print(res)"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "4998322f",
   "metadata": {},
   "source": [
    "# Hamming距离\n",
    "是指两个比特有差异的比特的比例。\n",
    "\n",
    "它是衡量二进制序列距离的一种方法。"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "id": "7d6c1474",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "0.6666666666666666\n"
     ]
    }
   ],
   "source": [
    "from scipy.spatial.distance import hamming\n",
    "\n",
    "p1 = (True, False, True)\n",
    "p2 = (False, True, True)\n",
    "\n",
    "res = hamming(p1, p2)\n",
    "\n",
    "print(res)"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.7.10"
  },
  "toc": {
   "base_numbering": 1,
   "nav_menu": {},
   "number_sections": true,
   "sideBar": true,
   "skip_h1_title": false,
   "title_cell": "Table of Contents",
   "title_sidebar": "Contents",
   "toc_cell": false,
   "toc_position": {},
   "toc_section_display": true,
   "toc_window_display": true
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
